package com.excel.analysis;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.JsonObject;

public class ExcelRow {

	private String value;
	
	private List<ExcelBean> beans = new ArrayList<ExcelBean>();

	/**
	 * 加入行
	 * 
	 * @param row
	 */
	public void addBean(ExcelBean excelBean) {
		beans.add(excelBean);
	}
	
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public List<ExcelBean> getBeans() {
		return beans;
	}

	public void setBeans(List<ExcelBean> beans) {
		this.beans = beans;
	}
	
	public String getJsonValue(String key) {
		JsonObject jsonObject = GsonUtils.getValues(value);
		Object o = jsonObject.get(key);
		if (o != null) {
			return jsonObject.get(key).getAsString();
		} else {
			return null;
		}
	}
}
